import request from '@/utils/request'


// 新增考试小题
export function addExamPaperTopic(data) {
  return request({
    url: '/exam/fixationPaper',
    method: 'post',
    data: data
  })
}

//从组卷新增考试小题
export function addPaperTopicFromPaper(data) {
  return request({
    url: '/exam/fixationPaper/addTopic/' + data.titleId,
    method: 'post',
    data: data
  })
}

//获取随机策略试题列表
export function getTacticsTopicList(tacticsId) {
  return request({
    url: '/exam/randomPaper/getTacticsTopicList/' + tacticsId,
    method: 'post'
  })
}
// 删除考试小题
export function delExamPaperTopic(topicId, titleId) {
  return request({
    url: '/exam/fixationPaper/removePaperTopic/' + topicId + '/' + titleId,
    method: 'delete'
  })
}

//修改小题分值
export function changeTopicScore(topicId, titleId, score) {
  return request({
    url: '/exam/fixationPaper/editTopicScore/' + topicId + '/' + titleId + '/' + score,
    method: 'put'
  })
}

//获取小题
export function getPaperTopic(topicId, titleId) {
  return request({
    url: '/exam/fixationPaper/getPaperTopic/' + topicId + '/' + titleId,
    method: 'get'
  })
}


export function choiceTopic(titleId, topicIds) {
  return request({
    url: '/exam/fixationPaper/choiceTopic/' + titleId + '/' + topicIds,
    method: 'post'
  })
}
//试题分类-根据taskId获取categoryId
export function getCategoryld(taskld) {
  return request({
    url: '/exam/topicCategory/getCategoryId/'+taskld,
    method: 'get'
  })
}



